<include file="public:header"/>
<include file="public:sidebar"/>
<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            基本配置
        </h1>
        <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
            <li class="active">基本配置</li>
        </ol>
    </section>
    <!-- Main content -->
    <section class="content">
        <div class="col-md-12">
            <div style="margin: 10px;">
                <button onclick="history.go(-1)" class="layui-btn layui-btn-sm layui-btn-radius layui-btn-danger">
                    <i class="layui-icon">&#xe65c;</i>返回
                </button>
            </div>
            <!-- Horizontal Form -->
            <div class="box box-info">
                <div class="box-header with-border">
                    <h3 class="box-title">基本配置</h3>
                </div>
                <!-- /.box-header -->
                <!-- form start -->
                <form action="{:Url('setting/insert')}" method="post"
                      class="form-horizontal layui-form" autocomplete="off">
                    <div class="box-body">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">
                                <span class="text-danger">*</span>网站名
                            </label>
                            <div class="col-sm-4">
                                <input type="text" class="form-control"
                                       placeholder="网站名" name="title"
                                       lay-verify="required"
                                       value="<notempty name='info'>{$info.title}</notempty>">
                                <input type="hidden" name="id"
                                       value="<notempty name='info'>{$info.id}</notempty>">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">
                                <span class="text-danger">*</span>公司名
                            </label>
                            <div class="col-sm-4">
                                <input type="text" class="form-control"
                                       placeholder="公司名" name="company"
                                       lay-verify="required"
                                       value="<notempty name='info'>{$info.company}</notempty>">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">
                                联系电话
                            </label>
                            <div class="col-sm-4">
                                <input type="tel"  lay-verify="required"
                                       class="form-control" name="tel"
                                       placeholder="联系电话"
                                       value="<notempty name='info'>{$info.tel}</notempty>">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">
                                充值面额
                            </label>
                            <div class="col-sm-4">
                                <textarea  class="form-control"
                                  lay-verify="required"
                                  name="extends"><notempty name='info'>{$info.extends}</notempty></textarea>
                                <div class="text-danger">
                                    *使用','隔开
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">
                                升级VIP金额
                            </label>
                            <div class="col-sm-4">
                                <input type="number" class="form-control"
                                   placeholder="升级VIP金额" name="vip"
                                   lay-verify="required"
                                   value="<notempty name='info'>{$info.vip}</notempty>">
                            </div>
                        </div>
<!--                        <div class="form-group">-->
<!--                            <label class="col-sm-2 control-label">-->
<!--                                充值手续费-->
<!--                            </label>-->
<!--                            <div class="col-sm-4">-->
<!--                                <input type="number" class="form-control"-->
<!--                                       placeholder="充值手续费" name="poundage"-->
<!--                                       lay-verify="required"-->
<!--                                       value="<notempty name='info'>{$info.poundage}</notempty>">-->
<!--                            </div>-->
<!--                        </div>-->
                        <div class="form-group">
                            <label class="col-sm-2 control-label">
                                发布活动花费
                            </label>
                            <div class="col-sm-4">
                                <input type="number" class="form-control"
                                       placeholder="发布活动花费" name="used"
                                       lay-verify="required"
                                       value="<notempty name='info'>{$info.used}</notempty>">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">
                                VIP会员优惠比例
                            </label>
                            <div class="col-sm-4">
                                <input type="number" class="form-control"
                                       placeholder="VIP会员优惠比例" name="percent"
                                       lay-verify="required"
                                       value="<notempty name='info'>{$info.percent}</notempty>">
                            </div>
                        </div>
<!--                        <div class="form-group">-->
<!--                            <label class="col-sm-2 control-label">-->
<!--                                全国二维码价格-->
<!--                            </label>-->
<!--                            <div class="col-sm-4">-->
<!--                                <input type="number" class="form-control"-->
<!--                                  placeholder="全国二维码价格" name="country"-->
<!--                                  lay-verify="required"-->
<!--                                  value="<notempty name='info'>{$info.country}</notempty>">-->
<!--                            </div>-->
<!--                        </div>-->
<!--                        <div class="form-group">-->
<!--                            <label class="col-sm-2 control-label">-->
<!--                                省级二维码价格-->
<!--                            </label>-->
<!--                            <div class="col-sm-4">-->
<!--                                <input type="number" class="form-control"-->
<!--                                       placeholder="省级二维码价格" name="pro"-->
<!--                                       lay-verify="required"-->
<!--                                       value="<notempty name='info'>{$info.pro}</notempty>">-->
<!--                            </div>-->
<!--                        </div>-->
<!--                        <div class="form-group">-->
<!--                            <label class="col-sm-2 control-label">-->
<!--                                市级二维码价格-->
<!--                            </label>-->
<!--                            <div class="col-sm-4">-->
<!--                                <input type="number" class="form-control"-->
<!--                                       placeholder="市级二维码价格" name="city"-->
<!--                                       lay-verify="required"-->
<!--                                       value="<notempty name='info'>{$info.city}</notempty>">-->
<!--                            </div>-->
<!--                        </div>-->
<!--                        <div class="form-group">-->
<!--                            <label class="col-sm-2 control-label">-->
<!--                                县级二维码价格-->
<!--                            </label>-->
<!--                            <div class="col-sm-4">-->
<!--                                <input type="number" class="form-control"-->
<!--                                       placeholder="县级二维码价格" name="area"-->
<!--                                       lay-verify="required"-->
<!--                                       value="<notempty name='info'>{$info.area}</notempty>">-->
<!--                            </div>-->
<!--                        </div>-->
<!--                        <div class="form-group">-->
<!--                            <label class="col-sm-2 control-label">-->
<!--                                镇级二维码价格-->
<!--                            </label>-->
<!--                            <div class="col-sm-4">-->
<!--                                <input type="number" class="form-control"-->
<!--                                       placeholder="镇级二维码价格" name="town"-->
<!--                                       lay-verify="required"-->
<!--                                       value="<notempty name='info'>{$info.town}</notempty>">-->
<!--                            </div>-->
<!--                        </div>-->
                        <div class="form-group">
                            <label class="col-sm-2 control-label">
                                版权所有
                            </label>
                            <div class="col-sm-4">
                                <input type="text"  lay-verify="required"
                                  class="form-control" name="copyright"
                                  placeholder="版权所有"
                                  value="<notempty name='info'>{$info.copyright}</notempty>">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">
                                地址
                            </label>
                            <div class="col-sm-4">
                                <input type="text"  lay-verify="required"
                                    class="form-control" name="address"
                                    placeholder="地址"
                                    value="<notempty name='info'>{$info.address}</notempty>">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label">
                            </label>
                            <div class="col-sm-4">
                                <button type="submit" class="btn btn-info" lay-submit lay-filter="*">确定</button>
                                <!--<button type="reset" class="btn btn-default">取消</button>-->
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </section>
    <!-- /.content -->
</div>
<script>
    layui.use(['form','layer','laydate'],function () {
        var form = layui.form,
            layer = layui.layer;
        form.on('submit(*)', function(data){
            layer.load();
            $.post(data.form.action,data.field,function (result) {
                layer.close('loading');
                if(result.code){
                    layer.msg(result.msg);
                    return false;
                }
                layer.alert(result.msg,{icon:6,end:function () {
                    window.location.reload();
                }});
            });
            return false;
        });
    });
</script>
<include file="public:footer"/>